package com.liu.activiti.activiti.qingjia;

import com.liu.activiti.listener.BaseActivitiListener;
import lombok.extern.slf4j.Slf4j;
import org.activiti.engine.delegate.DelegateExecution;
import org.springframework.stereotype.Service;

@Slf4j
@Service("kzListener")
public class KzListener extends BaseActivitiListener {

    /**
     * 开始任务
     * @param execution
     */
    @Override
    public void doNormalStart(DelegateExecution execution) {
        String kzUserId = execution.getVariable("kzUserId", String.class);
        log.info("kzUserId:{}, 开始执行任务!", kzUserId);
        super.doNormalEnd(execution);
    };

    /**
     * 结束任务
     * @param execution
     */
    @Override
    protected void doNormalEnd(DelegateExecution execution) {
        String kzUserId = execution.getVariable("kzUserId", String.class);
        super.doNormalEnd(execution);
    }
}
